﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cadence.NET.Interfaces
{
    public interface ITaskContext
    {
        /// <summary>
        /// Gets or sets the error context.
        /// </summary>
        /// <value>
        /// The error context.
        /// </value>
        Exception ErrorContext { get; set; }

        /// <summary>
        /// Gets or sets the task started notification message.
        /// </summary>
        /// <value>
        /// The task started notification message.
        /// </value>
        string TaskStartedNotificationMessage { get; set; }

        /// <summary>
        /// Gets or sets the task completed notification message.
        /// </summary>
        /// <value>
        /// The task completed notification message.
        /// </value>
        string TaskCompletedNotificationMessage { get; set; }

        /// <summary>
        /// Gets or sets the duration of the run.
        /// </summary>
        /// <value>
        /// The duration of the run.
        /// </value>
        TimeSpan? RunDuration { get; }

        /// <summary>
        /// Gets or sets the last run started.
        /// </summary>
        /// <value>
        /// The last run started.
        /// </value>
        DateTime? LastRunStarted { get; set; }

        /// <summary>
        /// Gets or sets the last run completed.
        /// </summary>
        /// <value>
        /// The last run completed.
        /// </value>
        DateTime? LastRunCompleted { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is error.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance is error; otherwise, <c>false</c>.
        /// </value>
        bool IsError { get; set; }
    }
}
